package P1037_有效的回旋镖;

public class Solution {
    public boolean isBoomerang(int[][] points) {
        //斜率问题，  (Y1 - Y0)/(X1- X0) = (Y2 - Y0)/(X2 - X0)
        //避免除0问题，改为乘法
        return (points[1][1] - points[0][1]) * (points[2][0] - points[0][0]) != (points[2][1] - points[0][1]) * (points[1][0] - points[0][0]);


    }
    public static void main(String args[]){
        System.out.println(new P1037_有效的回旋镖.Solution().isBoomerang(new int[][]{{0,0},{1,2},{0,1}}));
    }
}
